function markup_jt = f_markup(share_jt, der_jt, bc_jt, bmc_jt, firmid_jt);
    ownmat    = repmat(firmid_jt, 1, length(firmid_jt));
    owner     = ownmat == ownmat';
    omega     = owner + (1 - owner) .* (bc_jt * (bmc_jt) * (bmc_jt)');
    markup_jt = - (omega .* der_jt') \ share_jt;
end
